import Layout from '@/layout'

const dangerRouter = [
  // 规章制度
  {
    path: '/dangerMenu/regulations',
    component: Layout,
    name: 'Regulations',
    // alwaysShow: true,
    // hidden:true,
    meta: { title: '规章制度', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'norms',
        name: 'Norms',
        component: () => import('@/views/dangerMenu/regulations/norms'),
        meta: { title: '制度规范', icon: 'form' }
      },
    ]
  },
  // 安全检查表
  {
    path: '/dangerMenu/security',
    component: Layout,
    name: 'Security',
    alwaysShow: true,
    meta: { title: '安全检查表', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'major',
        name: 'Major',
        component: () => import('@/views/dangerMenu/security/major'),
        meta: { title: '专业检查表', icon: 'form' }
      }
    ]
  },
  // 常规检查定义 (mock文件配置这块断掉)
  {
    path: '/dangerMenu/routine',
    component: Layout,
    name: 'Routine',
    alwaysShow: true,
    meta: { title: '常规检查定义', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'discipline',
        name: 'Discipline',
        component: () => import('@/views/dangerMenu/routine/discipline'),
        meta: { title: '常规现场检查', icon: 'form' }
      },
      {
        path: 'basic',
        name: 'Basic',
        component: () => import('@/views/dangerMenu/routine/basic'),
        meta: { title: '常规基础检查', icon: 'form' }
      },
      {
        path: 'temporary',
        name: 'Temporary',
        component: () => import('@/views/dangerMenu/routine/temporary'),
        meta: { title: '创建临时任务', icon: 'form' }
      }
    ]
  },
  // 隐患排查 
  {
    path: '/dangerMenu/hiddenDanger',
    component: Layout,
    name: 'HiddenDanger',
    alwaysShow: true,
    meta: { title: '隐患排查', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'tasklist',
        name: 'Tasklist',
        component: () => import('@/views/dangerMenu/hiddenDanger/tasklist'),
        meta: { title: '任务列表', icon: 'form' }
      },
      {
        path: 'mymission',
        name: 'Mymission',
        component: () => import('@/views/dangerMenu/hiddenDanger/mymission'),
        meta: { title: '我的任务', icon: 'form' }
      },
      {
        path: 'deletedanger',
        name: 'Deletedanger',
        component: () => import('@/views/dangerMenu/hiddenDanger/deletedanger'),
        meta: { title: '删除隐患', icon: 'form' }
      }
    ]
  },
  // 隐患治理 
  {
    path: '/dangerMenu/government',
    component: Layout,
    name: 'Government',
    alwaysShow: true,
    meta: { title: '隐患治理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'handle',
        name: 'Handle',
        component: () => import('@/views/dangerMenu/government/handle'),
        meta: { title: '我的待办', icon: 'form' }
      },
      {
        path: 'submitted',
        name: 'Submitted',
        component: () => import('@/views/dangerMenu/government/submitted'),
        meta: { title: '待提交', icon: 'form' }
      },
      {
        path: 'reviewed',
        name: 'Reviewed',
        component: () => import('@/views/dangerMenu/government/reviewed'),
        meta: { title: '待评审', icon: 'form' }
      },
      {
        path: 'rectified',
        name: 'Rectified',
        component: () => import('@/views/dangerMenu/government/rectified'),
        meta: { title: '待整改', icon: 'form' }
      },
      {
        path: 'checked',
        name: 'Checked',
        component: () => import('@/views/dangerMenu/government/checked'),
        meta: { title: '待验收', icon: 'form' }
      },
      {
        path: 'completed',
        name: 'Completed',
        component: () => import('@/views/dangerMenu/government/completed'),
        meta: { title: '已完成', icon: 'form' }
      },
      {
        path: 'problem',
        name: 'Problem',
        component: () => import('@/views/dangerMenu/government/problem'),
        meta: { title: '问题反馈', icon: 'form' }
      },
      {
        path: 'list',
        name: 'List',
        component: () => import('@/views/dangerMenu/government/list'),
        meta: { title: '隐患清单', icon: 'form' }
      },
    ]
  },
  // 台账清单
  {
    path: '/dangerMenu/accountlist',
    component: Layout,
    name: 'Accountlist',
    alwaysShow: true,
    meta: { title: '台账清单', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'rectification',
        name: 'Rectification',
        component: () => import('@/views/dangerMenu/accountlist/rectification'),
        meta: { title: '重大隐患整改台账', icon: 'form' }
      },
      {
        path: 'recaccount',
        name: 'Recaccount',
        component: () => import('@/views/dangerMenu/accountlist/recaccount'),
        meta: { title: '整改台账', icon: 'form' }
      },
      {
        path: 'checklist',
        name: 'Checklist',
        component: () => import('@/views/dangerMenu/accountlist/checklist'),
        meta: { title: '排查清单', icon: 'form' }
      }
    ]
  },
  // 统计分析
  {
    path: '/dangerMenu/analysis',
    component: Layout,
    name: 'Analysis',
    alwaysShow: true,
    meta: { title: '统计分析', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'annual',
        name: 'Annual',
        component: () => import('@/views/dangerMenu/analysis/annual'),
        meta: { title: '年度统计', icon: 'form' }
      },
      {
        path: 'type',
        name: 'Type',
        component: () => import('@/views/dangerMenu/analysis/type'),
        meta: { title: '类型统计', icon: 'form' }
      },
    ]
  },
]

export default dangerRouter